#ifndef INDUSTRIAL_ROBOT_CONTROL_APPLICATION_H
#define INDUSTRIAL_ROBOT_CONTROL_APPLICATION_H

#include <memory>
#include <thread>
#include <atomic>
#include <chrono>
#include <string>
#include <vector>

namespace IndustrialRobotControl {
namespace Core {

class ConfigLoader;
class RobotController;

class Application {
public:
    Application(int argc, char**argv);
    ~Application();
    
    // 禁止拷贝
    Application(const Application&) = delete;
    Application& operator=(const Application&) = delete;
    
    // 运行应用程序
    void run();
    
    // 停止应用程序
    void stop();
    
private:
    // 主控制循环
    void main_loop();
    
    int argc_;
    char**argv_;
    std::atomic<bool> running_;
    std::thread main_loop_thread_;
    
    std::unique_ptr<ConfigLoader> config_loader_;
    std::unique_ptr<RobotController> robot_controller_;
};

} // namespace Core
} // namespace IndustrialRobotControl

#endif // INDUSTRIAL_ROBOT_CONTROL_APPLICATION_H
